package edu.ynu.se.xiecheng.achitectureclass.controller;

import edu.ynu.se.xiecheng.achitectureclass.common.controller.LogicController;
import edu.ynu.se.xiecheng.achitectureclass.dao.CameraDao;
import edu.ynu.se.xiecheng.achitectureclass.entity.Camera;
import edu.ynu.se.xiecheng.achitectureclass.service.CameraService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "摄像机实体的控制器")
@RestController
@RequestMapping("/camera")
public class CameraController extends LogicController<CameraService, CameraDao,Camera, Long> {
    public CameraController(CameraService service ) { super(service);}

    @ApiOperation("获取所有照片路径")
    @GetMapping("/getPhotos")
    public List<String> getPhotos() {
        return service.getAllPhotos();
    }

}
